package pl.edu.agh.thieves.gui;

import java.io.File;
import javax.swing.DefaultListModel;

import pl.edu.agh.thieves.common.Item;

public class UserConfiguration {
	public DefaultListModel<Item> items;
	private double capacity;
	private int choosedalgorithm;
	private static UserConfiguration instance;
	private File file;
	private String commonparamnumberofiterations;
	private String fireflyparamnumberoffireflies;
	private String fireflyparamalpha;
	private String fireflyparambeta;
	private String fireflyparamgamma;
	private String cuckooparamprobability;
	private String cuckooparamnumberofnests;

	private UserConfiguration() {
		choosedalgorithm = 0;
		items = new DefaultListModel<Item>();
	}

	public static UserConfiguration getInstance() {
		if (instance == null) {
			instance = new UserConfiguration();
			return instance;
		} else {
			return instance;
		}
	}

	/**
	 * choosedalgorithm: 1 - firefly 2 - cuckoo
	 * 
	 * @return choosedalgorithm
	 */
	public int getChoosedalgorithm() {
		return choosedalgorithm;
	}

	public void setChoosedalgorithm(int choosedalgorithm) {
		this.choosedalgorithm = choosedalgorithm;
	}

	public double getCapability() {
		return capacity;
	}

	public void setCapacity(double capability) {
		this.capacity = capability;
	}

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}

	public String getCommonParamNumberOfIterations() {
		return commonparamnumberofiterations;
	}

	public void setCommonParamNumberOfIterations(
			String commonparamnumberofiterations) {
		this.commonparamnumberofiterations = commonparamnumberofiterations;
	}

	public String getFireflyParamNumberOfFireflies() {
		return fireflyparamnumberoffireflies;
	}

	public void setFireflyParamNumberOfFireflies(
			String fireflyparamnumberoffireflies) {
		this.fireflyparamnumberoffireflies = fireflyparamnumberoffireflies;
	}

	public String getFireflyParamAlpha() {
		return fireflyparamalpha;
	}

	public void setFireflyParamAlpha(String fireflyparamalpha) {
		this.fireflyparamalpha = fireflyparamalpha;
	}

	public String getFireflyParamBeta() {
		return fireflyparambeta;
	}

	public void setFireflyParamBeta(String fireflyparambeta) {
		this.fireflyparambeta = fireflyparambeta;
	}

	public String getFireflyParamGamma() {
		return fireflyparamgamma;
	}

	public void setFireflyParamGamma(String fireflyparamgamma) {
		this.fireflyparamgamma = fireflyparamgamma;
	}

	public String getCuckooParamProbability() {
		return cuckooparamprobability;
	}

	public void setCuckooParamProbability(String cuckooparamprobability) {
		this.cuckooparamprobability = cuckooparamprobability;
	}

	public String getCuckooParamNumberOfNests() {
		return cuckooparamnumberofnests;
	}

	public void setCuckooParamNumberOfNests(String cuckooparamnumberofnests) {
		this.cuckooparamnumberofnests = cuckooparamnumberofnests;
	}

}